package com.xpffly.design.adapter.common;

import com.xpffly.design.adapter.common.service.Target;
import com.xpffly.design.adapter.common.service.impl.Adapter;
import com.xpffly.design.adapter.common.service.impl.TargetImpl;

/**
 * @Author: xpengfei
 * @Date: 2021/4/12 21:12
 * @Description：适配器模式通用代码场景类
 */
public class Scene {
    public static void main(String[] args) {
        // 原有业务逻辑
        Target target = new TargetImpl();
        target.method();

        // 增加了适配器角色后的业务逻辑
        Target target1 = new Adapter();
        target1.method();
    }
}

